import service from '@/utils/request'

export const useErpApi = (id: number) => {
	return service.get('/erp/unit/' + id)
}

export const useErpSubmitApi = (dataForm: any) => {
	if (dataForm.id) {
		return service.put('/erp/unit', dataForm)
	} else {
		return service.post('/erp/unit', dataForm)
	}
}